package com.mobiusws.reports.action;

import java.util.List;

import javax.annotation.Resource;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

import com.mobiusws.reports.dao.TestDao;
import com.mobiusws.reports.model.LoginInfo;
import com.opensymphony.xwork2.ActionSupport;

public class TestAction extends ActionSupport {

	private static final long serialVersionUID = 5395964004991248282L;
	
	@Resource
	private TestDao testDao;
	
	private String result;
	
	@Override
	public String execute() throws Exception {
		List<LoginInfo> list = testDao.getLoginInfo();
		this.result=JSONArray.fromObject(list).toString();
		//System.out.println(this.result);
		return SUCCESS;
	}

	// a getter is required to get the result in pages
	public String getResult() {
		return result;
	}

}
